package com.yami.shop.common.config;

import java.util.HashSet;

/**
 * @author Citrus
 * @date 2021/8/6 14:32
 */
public class SensitiveWordConfig {

    private static final String SENSITIVE_WORD_SEARCH_URL = "/sys/pconfig/info/SENSITIVE_WORDS";
    private static final String API_SENSITIVE_WORD_SEARCH_URL = "/webConfig/info/SENSITIVE_WORDS";
    private static final String CAPTCHA_URL = "/captcha.jpg";
    private static final String SAVE_CONFIG = "/sys/pconfig/save";
    private static final String WEIXIN_INFO = "/weixin/weixinMenu/info";
    /**
     * 权限
     */
    private static final String GET_SHOP_MENU = "/sys/shopMenu/nav";
    /**
     * jsapi签名
     */
    private static final String CREATE_JSAPI_SIGNATURE = "/p/wx/jsapi/createJsapiSignature";
    // C端历史查询词列表
    private static final String SEARCH_HISTORY_RECORD = "/api/blog/searchHistoryRecordList";
    //脱敏变星
    static final HashSet<String> SENSITIVE_WHITE_SET;
    //删除脱敏词
    static final HashSet<String> SENSITIVE_DEL_SET;
    static {
        SENSITIVE_WHITE_SET = new HashSet<>();
        SENSITIVE_WHITE_SET.add(SENSITIVE_WORD_SEARCH_URL);
        SENSITIVE_WHITE_SET.add(CAPTCHA_URL);
        SENSITIVE_WHITE_SET.add(SAVE_CONFIG);
        SENSITIVE_WHITE_SET.add(GET_SHOP_MENU);
        SENSITIVE_WHITE_SET.add(CREATE_JSAPI_SIGNATURE);
        SENSITIVE_WHITE_SET.add(WEIXIN_INFO);
        SENSITIVE_WHITE_SET.add(API_SENSITIVE_WORD_SEARCH_URL);
        SENSITIVE_WHITE_SET.add(SEARCH_HISTORY_RECORD);
    }
    static {
        SENSITIVE_DEL_SET = new HashSet<>();
        SENSITIVE_DEL_SET.add("/hotSearch/searchByUserIdOrPrefix");
    }
    private SensitiveWordConfig() {

    }

    public static HashSet<String> getSensitiveWhiteSet() {
        return SENSITIVE_WHITE_SET;
    }

    public static HashSet<String> getSensitiveDelSet() {
        return SENSITIVE_DEL_SET;
    }
}
